package collection;

import java.util.*;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/3/3
 **/
public class LambdaDemo {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        Collections.sort(list, new Comparator<String>() {
            public int compare(String o1, String o2) {
                return o1.length()-o2.length();
            }
        });
        Collections.sort(list,( o1, o2)-> o1.length()-o2.length());

    }
}
